home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 1999 January / maximum-cd-1999-01.iso / Benchmarks / 12 Step / MusicMatch Jukebox / mmsetup.EXE / data1.cab / Help_Files / WebHelp.cab / WebHelp.class (.txt) < prev   
Encoding:
Java Class File  |  1998-03-27  |  11.2 KB  |  686 lines

  1. import hhapplet.AboutDialogBox;
  2. import hhapplet.ButtonLauncher;
  3. import hhapplet.ButtonPushEvent;
  4. import hhapplet.ButtonPushEventListener;
  5. import hhapplet.DialogDoneTarget;
  6. import hhapplet.IndexPane;
  7. import hhapplet.IndexSecondaryDialog;
  8. import hhapplet.IndexSecondaryEntry;
  9. import hhapplet.LabelLauncher;
  10. import hhapplet.PopupMenu;
  11. import hhapplet.SiteMapParserToContents;
  12. import hhapplet.SiteMapParserToIndex;
  13. import hhapplet.SplashScreen;
  14. import hhapplet.TabButton;
  15. import hhapplet.TabPanel;
  16. import hhapplet.URLFileHandler;
  17. import java.applet.Applet;
  18. import java.awt.BorderLayout;
  19. import java.awt.CardLayout;
  20. import java.awt.Color;
  21. import java.awt.Component;
  22. import java.awt.Container;
  23. import java.awt.Image;
  24. import java.awt.Label;
  25. import java.awt.LayoutManager;
  26. import java.awt.Panel;
  27. import java.awt.Rectangle;
  28. import java.awt.Window;
  29. import java.io.IOException;
  30. import java.io.InputStream;
  31. import java.net.MalformedURLException;
  32. import java.net.URL;
  33. import java.util.Vector;
  34. import sitemap.SiteMapParser;
  35. import treeview.TreeViewImageSet;
  36.  
  37. public class WebHelp extends Applet implements ButtonPushEventListener {
  38.    private static final String STR_APPLET_ID = "WebHelp Applet Version 1.01.121";
  39.    private static final String STR_COPYRIGHT = "Copyright (c) 1998 Blue Sky Software Corp. All rights reserved.";
  40.    private Window m_winFrameToShow;
  41.    private String m_strContentsFile;
  42.    private String m_strIndexFile;
  43.    private String m_strHelpFile;
  44.    private boolean m_bContentsLoaded;
  45.    private boolean m_bIndexLoaded;
  46.    private boolean m_bHelpLoaded;
  47.    private String m_strCurrentCommand;
  48.    private Panel m_pnlNav;
  49.    private TabPanel m_pnlTabs;
  50.    private CardLayout m_clLayout;
  51.    private boolean m_bParsing;
  52.    private Image[] m_imgList;
  53.    private TreeViewImageSet m_tvisImages;
  54.    private SiteMapParser m_smpContents;
  55.    private SiteMapParser m_smpIndex;
  56.    private SiteMapParser m_smpHelp;
  57.    private IndexPane m_ipIndex;
  58.    private Thread parser_thread;
  59.    private TabButton m_tbtnToc;
  60.    private TabButton m_tbtnIndex;
  61.    private TabButton m_tbtnHelp;
  62.    private boolean m_bMustHaveSize;
  63.    private boolean m_bIsIE3;
  64.    private long m_lnTimeCreated = System.currentTimeMillis();
  65.  
  66.    public void stop() {
  67.       if (this.m_winFrameToShow != null) {
  68.          this.m_winFrameToShow.hide();
  69.       }
  70.  
  71.    }
  72.  
  73.    public void notifyButtonPushEvent(ButtonPushEvent var1) {
  74.       if (var1.getSource() == this.m_tbtnToc) {
  75.          this.m_tbtnToc.disable();
  76.          this.m_tbtnIndex.enable();
  77.          if (this.m_tbtnHelp != null) {
  78.             this.m_tbtnHelp.enable();
  79.          }
  80.  
  81.          this.DoContents(this.m_strContentsFile);
  82.          ((Component)this).repaint();
  83.       } else if (var1.getSource() == this.m_tbtnIndex) {
  84.          this.m_tbtnIndex.disable();
  85.          this.m_tbtnToc.enable();
  86.          if (this.m_tbtnHelp != null) {
  87.             this.m_tbtnHelp.enable();
  88.          }
  89.  
  90.          this.DoIndex(this.m_strIndexFile);
  91.          ((Component)this).repaint();
  92.       } else {
  93.          if (this.m_tbtnHelp != null && var1.getSource() == this.m_tbtnHelp) {
  94.             this.m_tbtnIndex.enable();
  95.             this.m_tbtnToc.enable();
  96.             this.m_tbtnHelp.disable();
  97.             this.DoHelp(this.m_strHelpFile);
  98.             ((Component)this).repaint();
  99.          }
  100.  
  101.       }
  102.    }
  103.  
  104.    private void DoBadCommand(String var1) {
  105.       ((Container)this).add(new Label("The command \"" + var1 + "\" is unrecognised"));
  106.    }
  107.  
  108.    private void DoNavPane() {
  109.       ((Component)this).setBackground(new Color(192, 192, 192));
  110.       ((Container)this).setLayout(new BorderLayout());
  111.       this.m_strContentsFile = ((Applet)this).getParameter("ContentsFile");
  112.       this.m_strIndexFile = ((Applet)this).getParameter("IndexFile");
  113.       this.m_strHelpFile = ((Applet)this).getParameter("HelpFile");
  114.       String var1 = ((Applet)this).getParameter("ContentsTab");
  115.       if (var1 == null) {
  116.          var1 = "Contents";
  117.       }
  118.  
  119.       String var2 = ((Applet)this).getParameter("IndexTab");
  120.       if (var2 == null) {
  121.          var2 = "Index";
  122.       }
  123.  
  124.       String var3 = null;
  125.       if (this.m_strHelpFile != null) {
  126.          var3 = ((Applet)this).getParameter("HelpTab");
  127.          if (var3 == null) {
  128.             var3 = "Help";
  129.          }
  130.       }
  131.  
  132.       this.m_pnlTabs = null;
  133.       this.m_pnlTabs = new TabPanel();
  134.       this.m_pnlTabs.setBackground(((Component)this).getBackground());
  135.       this.m_pnlTabs.setLayout((LayoutManager)null);
  136.       this.m_tbtnToc = new TabButton(var1);
  137.       this.m_tbtnToc.addButtonPushEventListener(this);
  138.       this.m_tbtnIndex = new TabButton(var2);
  139.       this.m_tbtnIndex.addButtonPushEventListener(this);
  140.       this.m_pnlTabs.add(this.m_tbtnToc);
  141.       this.m_pnlTabs.add(this.m_tbtnIndex);
  142.       if (this.m_strHelpFile != null) {
  143.          this.m_tbtnHelp = new TabButton(var3);
  144.          this.m_tbtnHelp.addButtonPushEventListener(this);
  145.          this.m_pnlTabs.add(this.m_tbtnHelp);
  146.       }
  147.  
  148.       ((Container)this).add("North", this.m_pnlTabs);
  149.       Rectangle var4 = ((Component)this).bounds();
  150.       this.rods_reshape(this.m_tbtnToc, 1, var4.y, this.m_tbtnToc.preferredSize().width, 25);
  151.       this.rods_reshape(this.m_tbtnIndex, 1 + this.m_tbtnToc.bounds().width, var4.y, this.m_tbtnIndex.preferredSize().width, 25);
  152.       if (this.m_tbtnHelp != null) {
  153.          this.rods_reshape(this.m_tbtnHelp, 1 + this.m_tbtnToc.bounds().width + this.m_tbtnIndex.bounds().width, var4.y, this.m_tbtnHelp.preferredSize().width, 25);
  154.       }
  155.  
  156.       this.rods_reshape(this.m_pnlTabs, var4.x, var4.y, var4.width, 28);
  157.       this.m_pnlTabs.requestFocus();
  158.       this.m_tbtnIndex.enable();
  159.       this.m_tbtnToc.enable();
  160.       if (this.m_tbtnHelp != null) {
  161.          this.m_tbtnHelp.enable();
  162.       }
  163.  
  164.       this.m_tbtnToc.disable();
  165.       this.m_tbtnIndex.disable();
  166.       if (this.m_tbtnHelp != null) {
  167.          this.m_tbtnHelp.disable();
  168.       }
  169.  
  170.       boolean var5 = true;
  171.       String var6 = ((Applet)this).getParameter("CurrentTab");
  172.       if (var6 != null && var6.equalsIgnoreCase("Index")) {
  173.          var5 = false;
  174.       }
  175.  
  176.       Object var7 = null;
  177.       ButtonPushEvent var11;
  178.       if (var5) {
  179.          var11 = new ButtonPushEvent(this.m_tbtnToc, 0, 0);
  180.       } else {
  181.          var11 = new ButtonPushEvent(this.m_tbtnIndex, 0, 0);
  182.       }
  183.  
  184.       this.notifyButtonPushEvent(var11);
  185.  
  186.       try {
  187.          String var8 = System.getProperty("java.vendor");
  188.          if (var8.startsWith("Netscape")) {
  189.             Panel var9 = new Panel();
  190.             ((Container)var9).setLayout((LayoutManager)null);
  191.             ((Component)var9).resize(((Component)this).bounds().width, 14);
  192.             ((Container)this).add("South", var9);
  193.             return;
  194.          }
  195.       } catch (Exception var10) {
  196.       }
  197.  
  198.    }
  199.  
  200.    public void Command(String var1, String var2) {
  201.       if (var1 != null) {
  202.          if (var1.equalsIgnoreCase("Contents")) {
  203.             this.DoContents(var2);
  204.          } else if (var1.equalsIgnoreCase("Index")) {
  205.             this.DoIndex(var2);
  206.          } else if (var1.equalsIgnoreCase("Version")) {
  207.             this.ShowVersion();
  208.          } else {
  209.             this.DoBadCommand("Command method does not support " + var1);
  210.          }
  211.       }
  212.    }
  213.  
  214.    public void destroy() {
  215.       if (this.m_winFrameToShow != null) {
  216.          this.m_winFrameToShow.hide();
  217.          this.m_winFrameToShow.dispose();
  218.          this.m_winFrameToShow = null;
  219.       }
  220.  
  221.       if (this.m_smpContents != null) {
  222.          this.m_smpContents.closeFiles();
  223.       }
  224.  
  225.       if (this.m_smpIndex != null) {
  226.          this.m_smpIndex.closeFiles();
  227.       }
  228.  
  229.       if (this.m_smpHelp != null) {
  230.          this.m_smpHelp.closeFiles();
  231.       }
  232.  
  233.       if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
  234.          this.m_ipIndex.getList().clear();
  235.       }
  236.  
  237.       if (this.m_tvisImages != null) {
  238.          this.m_tvisImages.releaseImages(this.m_imgList);
  239.       }
  240.  
  241.       if (this.parser_thread != null && this.parser_thread.isAlive()) {
  242.          this.parser_thread.stop();
  243.          this.parser_thread = null;
  244.       }
  245.  
  246.    }
  247.  
  248.    protected void rods_reshape(Component var1, int var2, int var3, int var4, int var5) {
  249.       var1.move(var2, var3);
  250.       var1.resize(var4, var5);
  251.    }
  252.  
  253.    private void DoContents(String var1) {
  254.       if (var1 == null) {
  255.          ((Container)this).setLayout(new BorderLayout());
  256.       }
  257.  
  258.       if (this.m_pnlNav == null) {
  259.          this.m_clLayout = new CardLayout();
  260.          this.m_pnlNav = new Panel();
  261.          this.m_pnlNav.setLayout(this.m_clLayout);
  262.          ((Container)this).add("Center", this.m_pnlNav);
  263.       }
  264.  
  265.       if (this.m_tvisImages == null) {
  266.          this.m_tvisImages = new TreeViewImageSet();
  267.          this.m_imgList = new Image[14];
  268.          this.m_imgList = this.m_tvisImages.reallyGetImages();
  269.       }
  270.  
  271.       if (var1 == null) {
  272.          var1 = ((Applet)this).getParameter("Item1");
  273.       }
  274.  
  275.       if (this.m_bContentsLoaded && this.m_strContentsFile != null && this.m_strContentsFile.equals(var1)) {
  276.          this.m_clLayout.show(this.m_pnlNav, "Contents");
  277.       } else {
  278.          this.m_strContentsFile = var1;
  279.          this.m_bContentsLoaded = true;
  280.          this.m_bMustHaveSize = true;
  281.  
  282.          try {
  283.             URL var2 = URLFileHandler.makeURL(((Applet)this).getDocumentBase(), var1, (String)null);
  284.             InputStream var3 = var2.openStream();
  285.             SiteMapParserToContents var4 = new SiteMapParserToContents(this, this.m_imgList);
  286.             if (this.m_smpContents != null) {
  287.                this.m_smpContents.closeFiles();
  288.             }
  289.  
  290.             this.m_smpContents = new SiteMapParser(var3, var4);
  291.             ((Applet)this).showStatus("Loading Table of Contents...");
  292.             this.m_pnlNav.add("Contents", var4.getTree());
  293.             this.m_clLayout.show(this.m_pnlNav, "Contents");
  294.             var4.getTree().requestFocus();
  295.             this.parser_thread = this.m_smpContents.parseInSeparateThread();
  296.             ((Component)this).repaint();
  297.             ((Component)this).show();
  298.             var4.getTree().requestFocus();
  299.          } catch (IOException var6) {
  300.             ((Container)this).add("Center", new Label("Can't open URL or file " + ((Throwable)var6).getMessage()));
  301.          }
  302.       }
  303.    }
  304.  
  305.    private void DoHHVersion(boolean var1) {
  306.       String var2 = null;
  307.       Object var3 = null;
  308.       String var4 = null;
  309.       if (!var1) {
  310.          var2 = ((Applet)this).getParameter("Button");
  311.          String var12 = ((Applet)this).getParameter("Text");
  312.          if (var2 == null && var12 == null) {
  313.             return;
  314.          }
  315.  
  316.          var4 = var2 != null ? var2 : var12;
  317.       }
  318.  
  319.       Vector var5 = new Vector();
  320.       var5.addElement("WebHelp Applet Version 1.01.121");
  321.       var5.addElement("Copyright (c) 1998 Blue Sky Software Corp. All rights reserved.");
  322.  
  323.       try {
  324.          var5.addElement("Java VM vendor: " + System.getProperty("java.vendor"));
  325.       } catch (Exception var11) {
  326.       }
  327.  
  328.       try {
  329.          var5.addElement("Java version: " + System.getProperty("java.version"));
  330.       } catch (Exception var10) {
  331.       }
  332.  
  333.       try {
  334.          var5.addElement("Java library version: " + System.getProperty("java.class.version"));
  335.       } catch (Exception var9) {
  336.       }
  337.  
  338.       try {
  339.          String var6 = "Operating System: " + System.getProperty("os.name") + " " + System.getProperty("os.version") + " (" + System.getProperty("os.arch") + ")";
  340.          var5.addElement(var6);
  341.       } catch (Exception var8) {
  342.       }
  343.  
  344.       AboutDialogBox var13 = new AboutDialogBox("About WebHelp Applet", var5);
  345.       if (var1) {
  346.          var13.show();
  347.       } else {
  348.          Component var7 = var2 != null ? (Component)(new ButtonLauncher(var4, var13)) : (Component)(new LabelLauncher(var4, var13));
  349.          ((Container)this).setLayout(new BorderLayout());
  350.          ((Container)this).add("Center", var7);
  351.          this.m_winFrameToShow = var13;
  352.       }
  353.    }
  354.  
  355.    public synchronized void resize(int var1, int var2) {
  356.       super.resize(var1, var2);
  357.    }
  358.  
  359.    public synchronized boolean checkSize() {
  360.       if (((Component)this).bounds().width == 0 && ((Component)this).bounds().height == 0) {
  361.          String var1 = ((Applet)this).getDocumentBase().toString();
  362.          int var2 = var1.lastIndexOf(".");
  363.          String var3 = var1.substring(var2, var1.length());
  364.          var1 = var1.substring(0, var2);
  365.          var1 = var1 + "f" + var3;
  366.  
  367.          try {
  368.             URL var4 = new URL(var1);
  369.             ((Applet)this).getAppletContext().showDocument(var4, "_self");
  370.             return false;
  371.          } catch (Exception var5) {
  372.          }
  373.       }
  374.  
  375.       return true;
  376.    }
  377.  
  378.    private void DoSplash() {
  379.       ((Applet)this).showStatus("Loading Splash Image...");
  380.  
  381.       try {
  382.          Object var1 = null;
  383.          Object var2 = null;
  384.  
  385.          try {
  386.             var13 = ((Applet)this).getImage(URLFileHandler.makeURL(((Applet)this).getDocumentBase(), ((Applet)this).getParameter("Item1"), (String)null));
  387.          } finally {
  388.             ;
  389.          }
  390.  
  391.          int var3 = 2500;
  392.  
  393.          try {
  394.             var3 = new Integer(((Applet)this).getParameter("Item2"));
  395.          } catch (NumberFormatException var10) {
  396.          }
  397.  
  398.          SplashScreen var4 = new SplashScreen(this, var13, var3, (String)var2);
  399.          var4.show();
  400.       } catch (MalformedURLException var12) {
  401.          ((Container)this).add("Center", new Label("Can't open URL or file " + ((Throwable)var12).getMessage()));
  402.       }
  403.    }
  404.  
  405.    private void DoAboutBox() {
  406.       String var1 = ((Applet)this).getParameter("Button");
  407.       String var2 = ((Applet)this).getParameter("Text");
  408.       if (var1 != null || var2 != null) {
  409.          String var3 = var1 != null ? var1 : var2;
  410.          String var4 = ((Applet)this).getParameter("Item1");
  411.          Vector var5 = new Vector();
  412.  
  413.          String var7;
  414.          for(int var6 = 0; (var7 = ((Applet)this).getParameter("Item" + (var6 + 2))) != null; ++var6) {
  415.             var5.addElement(var7);
  416.          }
  417.  
  418.          AboutDialogBox var8 = new AboutDialogBox(var4, var5);
  419.          Component var9 = var1 != null ? (Component)(new ButtonLauncher(var3, var8)) : (Component)(new LabelLauncher(var3, var8));
  420.          ((Container)this).setLayout(new BorderLayout());
  421.          ((Container)this).add("Center", var9);
  422.          this.m_winFrameToShow = var8;
  423.       }
  424.    }
  425.  
  426.    private void DoIndex(String var1) {
  427.       if (var1 == null) {
  428.          ((Container)this).setLayout(new BorderLayout());
  429.       }
  430.  
  431.       if (this.m_pnlNav == null) {
  432.          this.m_clLayout = new CardLayout();
  433.          this.m_pnlNav = new Panel();
  434.          this.m_pnlNav.setLayout(this.m_clLayout);
  435.          ((Container)this).add("Center", this.m_pnlNav);
  436.       }
  437.  
  438.       if (var1 == null) {
  439.          var1 = ((Applet)this).getParameter("Item1");
  440.       }
  441.  
  442.       if (this.m_bIndexLoaded && this.m_strIndexFile != null && this.m_strIndexFile.equals(var1)) {
  443.          this.m_clLayout.show(this.m_pnlNav, "Index");
  444.          if (this.m_ipIndex != null) {
  445.             this.m_ipIndex.requestFocus();
  446.          }
  447.  
  448.       } else {
  449.          this.m_strIndexFile = var1;
  450.          this.m_bIndexLoaded = true;
  451.          this.m_bMustHaveSize = true;
  452.  
  453.          try {
  454.             InputStream var2 = URLFileHandler.makeURL(((Applet)this).getDocumentBase(), var1, (String)null).openStream();
  455.             SiteMapParserToIndex var3 = new SiteMapParserToIndex(this);
  456.             if (this.m_ipIndex != null && this.m_ipIndex.getList() != null) {
  457.                this.m_ipIndex.getList().clear();
  458.             }
  459.  
  460.             this.m_ipIndex = var3.getIndex();
  461.             this.m_pnlNav.add("Index", this.m_ipIndex);
  462.             this.m_clLayout.show(this.m_pnlNav, "Index");
  463.             ((Component)this).repaint();
  464.             ((Applet)this).showStatus("Loading Index...");
  465.             if (this.m_smpIndex != null) {
  466.                this.m_smpIndex.closeFiles();
  467.             }
  468.  
  469.             this.m_smpIndex = new SiteMapParser(var2, var3);
  470.             if (this.m_ipIndex != null) {
  471.                this.m_ipIndex.requestFocus();
  472.             }
  473.  
  474.             this.parser_thread = this.m_smpIndex.parseInSeparateThread();
  475.          } catch (IOException var5) {
  476.             ((Container)this).add("Center", new Label("Can't open URL or file " + ((Throwable)var5).getMessage()));
  477.          }
  478.       }
  479.    }
  480.  
  481.    public void start() {
  482.       if (this.m_bMustHaveSize) {
  483.          this.checkSize();
  484.       }
  485.  
  486.    }
  487.  
  488.    public String getAppletInfo() {
  489.       return "WebHelp Applet Version 1.01.121" + "\r\n" + "Copyright (c) 1998 Blue Sky Software Corp. All rights reserved.";
  490.    }
  491.  
  492.    public void Click() {
  493.       if (this.m_winFrameToShow != null) {
  494.          if (this.m_bIsIE3) {
  495.             MethodRunner var1 = new MethodRunner(this.m_winFrameToShow, "ClickThread");
  496.             ((Thread)var1).start();
  497.             return;
  498.          }
  499.  
  500.          this.m_winFrameToShow.show();
  501.       }
  502.  
  503.    }
  504.  
  505.    private void ShowVersion() {
  506.       this.DoHHVersion(true);
  507.    }
  508.  
  509.    public static int GetFontSize() {
  510.       byte var0 = 12;
  511.  
  512.       try {
  513.          if (System.getProperty("os.name").startsWith("Windows") && !System.getProperty("java.version").equals("1.1.4")) {
  514.             var0 = 10;
  515.          }
  516.  
  517.          return var0;
  518.       } finally {
  519.          ;
  520.       }
  521.    }
  522.  
  523.    public static String GetFontName() {
  524.       return "Dialog";
  525.    }
  526.  
  527.    public void init() {
  528.       this.m_lnTimeCreated = System.currentTimeMillis();
  529.       if (System.getProperty("java.vendor").startsWith("Microsoft") && System.getProperty("java.version").startsWith("1.0")) {
  530.          this.m_bIsIE3 = true;
  531.       }
  532.  
  533.       String var1 = ((Applet)this).getParameter("Command");
  534.       if (var1 != null) {
  535.          if (var1.equalsIgnoreCase("Contents")) {
  536.             this.DoContents((String)null);
  537.          } else if (var1.equalsIgnoreCase("Index")) {
  538.             this.DoIndex((String)null);
  539.          } else if (var1.equalsIgnoreCase("Splash")) {
  540.             this.DoSplash();
  541.          } else if (var1.equalsIgnoreCase("Help")) {
  542.             this.DoHelp((String)null);
  543.          } else if (var1.equalsIgnoreCase("Related Topics")) {
  544.             this.DoRelatedTopics(false);
  545.          } else if (var1.equalsIgnoreCase("Related Topics,MENU")) {
  546.             this.DoRelatedTopics(true);
  547.          } else if (var1.equalsIgnoreCase("HH Version")) {
  548.             this.DoHHVersion(false);
  549.          } else if (var1.equalsIgnoreCase("AboutBox")) {
  550.             this.DoAboutBox();
  551.          } else if (var1.equalsIgnoreCase("NavPane")) {
  552.             this.DoNavPane();
  553.          } else {
  554.             this.DoBadCommand(var1);
  555.          }
  556.  
  557.          this.m_strCurrentCommand = var1;
  558.       }
  559.    }
  560.  
  561.    private void DoHelp(String var1) {
  562.       if (var1 == null) {
  563.          ((Container)this).setLayout(new BorderLayout());
  564.       }
  565.  
  566.       if (this.m_pnlNav == null) {
  567.          this.m_clLayout = new CardLayout();
  568.          this.m_pnlNav = new Panel();
  569.          this.m_pnlNav.setLayout(this.m_clLayout);
  570.          ((Container)this).add("Center", this.m_pnlNav);
  571.       }
  572.  
  573.       if (this.m_tvisImages == null) {
  574.          this.m_tvisImages = new TreeViewImageSet();
  575.          this.m_imgList = new Image[14];
  576.          this.m_imgList = this.m_tvisImages.reallyGetImages();
  577.       }
  578.  
  579.       if (var1 == null) {
  580.          var1 = ((Applet)this).getParameter("Item1");
  581.       }
  582.  
  583.       if (this.m_bHelpLoaded && this.m_strHelpFile != null && this.m_strHelpFile.equals(var1)) {
  584.          this.m_clLayout.show(this.m_pnlNav, "Help");
  585.       } else {
  586.          this.m_strHelpFile = var1;
  587.          this.m_bHelpLoaded = true;
  588.  
  589.          try {
  590.             URL var2 = URLFileHandler.makeURL(((Applet)this).getDocumentBase(), var1, (String)null);
  591.             InputStream var3 = var2.openStream();
  592.             SiteMapParserToContents var4 = new SiteMapParserToContents(this, this.m_imgList);
  593.             if (this.m_smpHelp != null) {
  594.                this.m_smpHelp.closeFiles();
  595.             }
  596.  
  597.             this.m_smpHelp = new SiteMapParser(var3, var4);
  598.             ((Applet)this).showStatus("Loading Help Selections...");
  599.             this.m_pnlNav.add("Help", var4.getTree());
  600.             this.m_clLayout.show(this.m_pnlNav, "Help");
  601.             ((Component)this).repaint();
  602.             this.m_smpHelp.parse();
  603.          } catch (IOException var6) {
  604.             ((Container)this).add("Center", new Label("Can't open URL or file " + ((Throwable)var6).getMessage()));
  605.          }
  606.       }
  607.    }
  608.  
  609.    private void DoRelatedTopics(boolean var1) {
  610.       ((Applet)this).showStatus("Loading Related Topics Button...");
  611.       String var2 = ((Applet)this).getParameter("Button");
  612.       String var3 = ((Applet)this).getParameter("Text");
  613.       String var4 = ((Applet)this).getParameter("Frame");
  614.       if (var1 && System.getProperty("os.name").startsWith("SunOS")) {
  615.          var1 = false;
  616.       }
  617.  
  618.       boolean var5 = var2 == null && var3 == null;
  619.       String var6 = "";
  620.       if (!var5) {
  621.          var6 = var2 != null ? var2 : var3;
  622.       }
  623.  
  624.       Vector var7 = new Vector();
  625.       int var8 = 0;
  626.  
  627.       while(true) {
  628.          while(true) {
  629.             String var9;
  630.             if ((var9 = ((Applet)this).getParameter("Item" + (var8 + 1))) == null) {
  631.                if (var8 == 0) {
  632.                   return;
  633.                }
  634.  
  635.                if (var1) {
  636.                   PopupMenu var18 = new PopupMenu(this, var7);
  637.                   this.m_winFrameToShow = var18;
  638.                } else {
  639.                   IndexSecondaryDialog var19 = new IndexSecondaryDialog(this, var7, (DialogDoneTarget)null);
  640.                   this.m_winFrameToShow = var19;
  641.                }
  642.  
  643.                if (!var5) {
  644.                   Component var17;
  645.                   if (var2 != null) {
  646.                      var17 = (Component)(new ButtonLauncher(var6, this.m_winFrameToShow));
  647.                   } else {
  648.                      var17 = (Component)(new LabelLauncher(var6, this.m_winFrameToShow));
  649.                   }
  650.  
  651.                   ((Container)this).setLayout(new BorderLayout());
  652.                   ((Container)this).add("Center", var17);
  653.                }
  654.  
  655.                return;
  656.             }
  657.  
  658.             try {
  659.                IndexSecondaryEntry var10 = new IndexSecondaryEntry();
  660.                int var11 = var9.indexOf(59);
  661.                if (var11 != -1 && var11 != var9.length() - 1) {
  662.                   int var12 = var9.indexOf(59, var11 + 1);
  663.                   String var13 = var9.substring(0, var11);
  664.                   String var14 = var12 == -1 ? var9.substring(var11 + 1) : var9.substring(var11 + 1, var12);
  665.                   String var15 = var12 == -1 ? null : var9.substring(var11 + 1);
  666.                   var10.name = var13;
  667.                   var10.local = var14;
  668.                   var10.url = var15;
  669.                   var10.frame = var4;
  670.                   var7.addElement(var10);
  671.                   break;
  672.                }
  673.             } catch (MalformedURLException var16) {
  674.                break;
  675.             }
  676.          }
  677.  
  678.          ++var8;
  679.       }
  680.    }
  681.  
  682.    public synchronized void reshape(int var1, int var2, int var3, int var4) {
  683.       super.reshape(var1, var2, var3, var4);
  684.    }
  685. }
  686.